/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mighty.team.homemediacenterdescriptor.json;

import com.mighty.team.homemediacenterdescriptor.model.Movie;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.sf.json.JSONObject;

/**
 *
 * @author TSokolowski
 */
public class DataExtractor {

    private final static Logger LOGGER = Logger.getLogger(DataExtractor.class.getName());

    public Movie movieDetailsExtractor(JSONObject movieJson) {
        Movie movie = new Movie(movieJson.getString("Title"),
                movieJson.getString("Plot"),
                movieJson.getInt("Year"),
                movieJson.getString("Genre"));
        LOGGER.log(Level.ALL, movie.toString());
        return movie;
    }
}
